package sm

import (
	"net"
	"time"

	"github.com/xft/modbus"
)

// HandleConn 处理设备的 modbus 连接
func HandleConn(conn net.Conn) {
	cli := modbus.NewRTUOverTCPClient2(conn, time.Second*10)
	defer cli.Close()
	cli.SetSlaveID(1)
	readWorker(cli)
}
